<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增红包')" />
	<th:block th:include="include :: select2-css" />
	<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-packets-add">
			<h4 class="form-header h4">红包信息</h4> 
			<div class="form-group">	
				<label class="col-sm-2 control-label">红包名称：</label>
				<div class="col-sm-3">
					<input id="hbName" name="hbName"  class="form-control" type="text">
				</div>
				
				<label class="col-sm-2 control-label">红包数量：</label>
				<div class="col-sm-3">
					<input id="hbNumber" name="hbNumber"  class="form-control" type="text">
				</div>
			</div>
			
			<div class="form-group">	
				<label class="col-sm-2 control-label">金额：</label>
				<div class="col-sm-3">
					<input id="jine" name="jine"  class="form-control" type="text">
				</div>
				
				<label class="col-sm-2 control-label">满减条件金额：</label>
				<div class="col-sm-3">
					<input id="manjian" name="manjian" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-2 control-label">过期时间：</label>
				<div class="col-sm-3">
				<input type="text" class="form-control" id="gqDate" name="gqDate"  >
				</div>
			</div>
			<h4 class="form-header h4">红包属性</h4>
			<div class="form-group">	
				<label class="col-sm-2 control-label">手机端是否显示：</label>
				<div class="col-sm-3">
					<!-- <input id="selectedControl" name="selectedControl" th:field="*{selectedControl}" class="form-control" type="text"> -->
				<select id="selectedControl" name="selectedControl" class="form-control m-b"
						>
						<option value=1>显示</option>
						<option value=0>不显示</option>						
					</select>				
				</div>
				
				<label class="col-sm-2 control-label">红包 or 优惠卷：</label>
				<div class="col-sm-3">
					<!-- <input id="type" name="type" th:field="*{type}" class="form-control" type="text"> -->
				<select id="type" name="type" class="form-control m-b"
						>
						<option value=3001>红包</option>
						<option value=3002>优惠卷</option>
						<option value=3003>心愿单退回优惠卷</option>						
					</select>
				</div>
			</div>			
			
			
		</form>
    </div>
    <div th:include="include::footer"></div>
    <th:block th:include="include :: select2-js" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
		var prefix = ctx + "Packets/packets"
		$("#form-packets-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-packets-add').serialize());
	        }
	    }
		
		$("#gqDate").datetimepicker({
			format : "yyyy-mm-dd hh:ii:ss",
			autoclose : true
		});
	</script>
</body>
</html>
